#include "KeyboardPlayerInput.h"

KeyboardPlayerInput::KeyboardPlayerInput(Keyboard *keyb, Key down, Key up):
	keyboard(keyb)
{
	upKey = up;
	downKey = down;
}

KeyboardPlayerInput::~KeyboardPlayerInput(void)
{
}

bool KeyboardPlayerInput::goingUp()
{
	// if the up key is pressed and the down key is not pressed, we're going up. 
	if(keyboard->keyDown(upKey) && !keyboard->keyDown(downKey))
		return true;
	else
		return false;
}

bool KeyboardPlayerInput::goingDown()
{
	// if the down key is pressed and the up key is not pressed, we're going down! 
	if(keyboard->keyDown(downKey) && !keyboard->keyDown(upKey))
		return true;
	else
		return false;
}


